package com.zhu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhu.mapper.RoleMapper;
import com.zhu.pojo.Role;
import com.zhu.query.RoleQuery;
import com.zhu.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author xiaozhu
 * @since 2022-09-03
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getRole(RoleQuery roleQuery) {
        return roleMapper.getRole(roleQuery);
    }

    @Override
    public String getPerms(Long roleId) {
        return roleMapper.selectById(roleId).getAuthority();
    }

}
